package application.translators.impl;

import application.model.MaterialWithParametersModel;
import application.translators.Translator;

public class MaterialWithParametersTranslator implements Translator<Object[], MaterialWithParametersModel>
{
    @Override
    public MaterialWithParametersModel translate(Object[] input)
    {
        MaterialWithParametersModel materialModel = new MaterialWithParametersModel();

        materialModel.setMaterialId((Integer) input[0]);
        materialModel.setMaterialName((String) input[1]);
        materialModel.setStandardName((String) input[2]);
        materialModel.setRmMin((Double) input[3]);
        materialModel.setRmMax((Double) input[4]);
        materialModel.setRp02Min((Double) input[5]);
        materialModel.setRp02Max((Double) input[6]);
        materialModel.setA5Min((Double) input[7]);
        materialModel.setA5Max((Double) input[8]);
        materialModel.setHbMin((Double) input[9]);
        materialModel.setHbMax((Double) input[10]);
        materialModel.setHrcMin((Double) input[11]);
        materialModel.setHrcMax((Double) input[12]);
        materialModel.setKcMin((Double) input[13]);
        materialModel.setKcMax((Double) input[14]);
        materialModel.setKcvMin((Double) input[15]);
        materialModel.setKcvMax((Double) input[16]);
        materialModel.setProducents((String) input[17]);
        materialModel.setTypes((String) input[18]);
        materialModel.setAppliances((String) input[19]);

        return materialModel;
    }
}
